import request from "../uniHttp"

// 获得任务
export const getTasks = () => {
	return request({
		url: '/api/sczx/assess/evaStuTask/myTaskList',
	})
}

// 创建自己的任务
export const creatOwnerTasks = (data) => {
	return request({
		url: '/api/sczx/assess/evaStuTask/testTabByStu',
		data: data
	})
}

// 获得我的任务分页
export const getOwnerTasksPage = (data) => {
	return request({
		url: '/api/sczx/assess/evaStuTask/myTaskPage',
		data: data
	})
}

// 获得未完成的任务量表的试题
export const getQuestions = (tabIds, taskId) => {
	return request({
		url: '/api/sczx/assess/evaStuTask/detailByTaskId',
		data: {
			tabIds,
			taskId
		}
	})
}

// 获得量表列表
export const getScales = (data) => {
	return request({
		url: '/api/sczx/assess/evaTable/list',
		data: data
	})
}

// 获得量表分页列表
export const getScalesPage = (data) => {
	return request({
		url: '/api/sczx/assess/evaTable/page',
		data: data
	})
}

// 新增学生回答
export const addAnswers = (optId, queId, tabId, taskId) => {
	return request({
		url: '/api/sczx/assess/evaStuAnswer/create',
		data: {
			optId,
			queId,
			tabId,
			taskId
		}
	})
}

// 查询学生答题情况
export const myAnswerList = (tabId, taskId) => {
	return request({
		url: '/api/sczx/assess/evaStuAnswer/myAnswerList',
		data: {
			tabId,
			taskId
		}
	})
}